package hy.config;

import abc.Animal;
import abc.Stu;
import hy.beans.Teacher;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;
@EnableConfigurationProperties(Teacher.class)
@PropertySource("classpath:a.properties")
//@EnableConfigurationProperties(Stu.class)
@Configuration

@ImportResource("classpath:u.xml")
public class MyCfg {
    @Bean("animal")
    public Animal getAnimal(){
        return new Animal();
    }
}
